
import { top, lazyImg, getDoms, searchValue, } from '../../public/js/public.js'
class Homepage {

  constructor() {
    // 获取搜索框
    this.search = document.querySelector("#search")
    this.searchBtn = document.querySelector("#searchBtn")
    // 获取  userInfo
    this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
    this.init()

  }
  init () {
    top()
    lazyImg()
    window.addEventListener('scroll', () => { lazyImg })
    this.searchValue()
  }
  //搜索功能
  searchValue () {
    this.searchValue = searchValue
    this.searchValue()
  }

}

const homePage = new Homepage()

export default homePage